Skip to content

fix: write Codex dev skills as files#2988

Open
sjh9714 wants to merge 1 commit into
github:mainfrom
sjh9714:fix/2930-codex-dev-skills-copy
Open

fix: write Codex dev skills as files#2988
sjh9714 wants to merge 1 commit into
github:mainfrom
sjh9714:fix/2930-codex-dev-skills-copy

Conversation

@sjh9714

@sjh9714 sjh9714 commented Jun 15, 2026

Copy link
Copy Markdown

Description

Fixes #2930.

specify extension add --dev created symlinked Codex SKILL.md files, but Codex currently does not load those symlinked skills. This keeps dev-mode symlinks for other agents while writing Codex SKILL.md outputs as regular files in both the agent command registration path and the extension skill registration path.

Normal non-dev installs are unchanged, and existing Copilot dev symlink behavior remains covered by the existing test.

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

Commands run:

  • uv run --extra test pytest tests/test_extensions.py -k "add_dev_writes_codex_skills_as_files" -q (failed before the fix, passed after)
  • uv run --extra test pytest tests/test_extensions.py -q
  • uv sync --extra test && uv run pytest -q
  • uv run specify --help
  • git diff --check

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

Codex assisted with issue scouting, code-path inspection, and local review. I reviewed the final diff and ran the listed checks locally.

@sjh9714 sjh9714 requested a review from mnriem as a code owner June 15, 2026 20:15
@mnriem

mnriem commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Thanks for tracking this down — the bug in #2930 is real and the behavior here is correct: Codex can't load symlinked SKILL.md files, so writing them as real files is the right outcome.

My concern is with how it's special-cased rather than the fix itself. The change hardcodes agent_name == "codex" in CommandRegistrar._write_registered_output (agents.py) and selected_ai != "codex" in _register_extension_skills (extensions.py). Both are generic, agent-agnostic code paths, and we have an integration architecture specifically so per-agent knowledge lives in one declarative place. AGENT_CONFIGS is already derived from INTEGRATION_REGISTRY via _build_agent_configs(), and CodexIntegration is a clean self-contained class — "Codex can't use dev symlinks" really belongs there, not in shared plumbing. (The existing agent_name == "copilot" carve-out is the same debt; I'd rather not grow it.)

Could we route this through integration metadata instead? Roughly:

  1. Add dev_no_symlink = True to CodexIntegration and propagate it into the config dict in _build_agent_configs() the same way invoke_separator already is.
  2. In _write_registered_output, swap the string check for a metadata lookup:
    if not link_outputs or agent_config.get("dev_no_symlink"):
  3. In _register_extension_skills, replace selected_ai != "codex" with link_outputs and not agent_config.get("dev_no_symlink").

This follows the existing inject_name convention (opt-in flag, absent means the established default of symlinking), keeps the constraint owned by the Codex integration as the single source of truth, and means any future agent with the same limitation just sets the flag — no edits to shared code. The test you added is great and would carry over almost unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Codex does not recognize skills with symbolic link generated by specify extension add --dev

2 participants